/**
 * Perform the element default action.
 *
 * @param {JSEvent} [event] the event that triggered the action
 *
 * @properties={typeid:24,uuid:"6087F9FF-58E6-4176-A2B0-FE0B418BD8E4"}
 */
function salir(event) 
{
	databaseManager.setAutoSave(true)
	var $win = application.getWindow('ver_domic')
	$win.hide()
	$win.destroy()
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"88415711-1298-433D-89B6-AA8C97120A6A"}
 */
function cancelar(event) 
{
	databaseManager.revertEditedRecords()
	salir();
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"E2C23AE0-36A8-4ADD-BDEE-FE41A42F682B"}
 */
function confirma(event) 
{
	databaseManager.saveData(foundset.getRecord(foundset.getSelectedIndex()))
	salir();
}

/**
 * Callback method for when form is shown.
 *
 * @param {Boolean} firstShow form is shown first time after load
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"03668674-21D6-4D9B-9FBF-141DE57CD543"}
 */
function onShow(firstShow, event) {
	databaseManager.setAutoSave(false)
}
